from django.urls import path
from .views import LoggerView, ExceptionView, ResponseView, BannerView, demo_cors, demo_redis, demo_django_redis, \
    demo_cache, demo_celery, SeckillView

from rest_framework.routers import SimpleRouter

router = SimpleRouter()
router.register('banner', BannerView, 'banner')
router.register('seckill', SeckillView, 'seckill')

urlpatterns = [
    path('logger/', LoggerView.as_view()),
    path('exception/', ExceptionView.as_view()),
    path('response/', ResponseView.as_view()),
    path('cors/', demo_cors),
    path('redis/', demo_redis),
    path('django_redis/', demo_django_redis),
    path('demo_cache/', demo_cache),
    path('demo_celery/', demo_celery),
]
urlpatterns += router.urls
